import Vue from 'vue'
import Vuex from 'vuex'
import test from './modules/test'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)


export default new Vuex.Store({
  modules: {
    test
  },
   plugins: [
    createPersistedState({
        storage: {
            getItem: key => wx.getStorageSync(key),
            setItem: (key, value) => wx.setStorageSync(key, value),
            removeItem: key => {}
        }
    })
    ]
})